from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score

# 训练逻辑回归模型
logistic = LogisticRegression(max_iter=1000)
logistic.fit(X_train, y_train)

# 评估模型
y_pred_logistic = logistic.predict(X_test)
print("Logistic Regression Test Accuracy:", accuracy_score(y_test, y_pred_logistic))

